(define length 
  (lambda (I) 
    (cond 
      (( null? I) 0) 
      (else (addl (length (cdr I)))))))

(lambda (I) 
  (cond 
    (( null? I) 0) 
    (else (addl (eternity (cdr I)))))) 

((lambda (length) 
  (lambda (I) 
    (cond 
      (( null? I) 0) 
      (else (addl (length (cdr I))))))) 
eternity)

((lambda (f) 
  (lambda (l) 
    (cond 
      (( null? I) 0) 
      (else (add1  (f (cdr l))))))) 
((lambda (g) 
  (lambda (l) 
    (cond 
      (( null? l) 0) 
      (else (add1  (g (cdr I))))))) 
eternity))

( ((lambda (mk-length) 
  (mk-length mk-length)) 
(lambda (mk-length) 
  (lambda (l) 
    (cond 
      (( null? l) 0) 
      (else (addl 
        ( (mk-length eternity) (cdr l))))))))
  `(apple))

((lambda (mk-length) 
  (mk-length mk-length)) 
(lambda (mk-length)
  ((lambda (length) 
    (lambda (I) 
      (cond 
        (( null? I) 0) 
        (else (addl (length (cdr l))))))) 
  (mk-length mk-length))))

((lambda (mk-length) 
  ((lambda (length) 
    (lambda (I) 
      (cond 
        (( null? I) 0) 
        (else (add1  (length (cdr I))))))) 
  (mk-length mk-length))) 
(lambda (mk-length) 
  ((lambda (length) 
    (lambda (I) 
      (cond 
        (( null? I) 0) 
        (else (add1  (length (cdr I))))))) 
  (mk-length mk-length))))

(((lambda (mk-length) 
  (mk-length mk-length)) 
(lambda (mk-length) 
  (lambda (I) 
    (cond 
      ((null? I) 0) 
      (else 
        (+ 1 (mk-length mk-length) (cdr I))))))))

(((lambda (mk-length) 
  (mk-length mk-length)) 
(lambda (mk-length) 
  (lambda (I) 
    (cond 
      ((null? I) 0) 
      (else 
        (+ 1 (lambda (x) ( (mk-length mk-length) x)) (cdr I))))))))



((lambda (mk-length) 
  (mk-length mk-length)) 
(lambda (mk-length)
  ((lambda (length) 
    (lambda (l) 
      (cond 
        (( null? l) 0) 
        (else (+ 1 ( length (cdr l)))))))
    (lambda (x) ((mk-length mk-length) x)))))

; 抽出逻辑函数体
((lambda (le) 
  ((lambda (mk-length) 
    (mk-length mk-length)) 
  (lambda (mk-length) 
    (le (lambda (x) ((mk-length mk-length) x)))))) 
(lambda (length) 
  (lambda (l) 
    (cond 
      (( null? l) 0) 
      (else (+ 1 ( length (cdr l))))))))

(define Y
  (lambda (le) 
    ((lambda (f) (f f)) 
      (lambda (f) 
        (le (lambda (x) ((f f) x)))))))


Y = fun(M) -> 
  (fun(F) -> F(F) end)(
    fun(F) ->
      M(fun(X) -> (F(F))(X) end) 
    end
  ) end.

Y2= fun(M) -> 
  G = fun (F) -> M(fun(X) -> (F(F))(X) end) end,
  G(G)
end.
